package com.kantboot.business.shop.domain.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

@Entity
@Getter
@Setter
@Table(name = "bus_shop_address_in_user_account")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
public class BusShopAddressInUserAccount implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @CreatedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;

    /**
     * 国家或地区编码
     */
    @Column(name = "state_area_code")
    private String stateAreaCode;

    /**
     * 国家或地区
     */
    @Column(name = "level_0_code")
    private String level0Code;

    /**
     * 一级行政区名称
     */
    @Column(name = "level_1_name")
    private String level1Name;

    /**
     * 二级行政区名称
     */
    @Column(name = "level_2_name")
    private String level2Name;

    /**
     * 三级行政区名称
     */
    @Column(name = "level_3_name")
    private String level3Name;

    /**
     * 一级行政区编码
     */
    @Column(name = "level_1_code")
    private String level1Code;

    /**
     * 二级行政区编码
     */
    @Column(name = "level_2_code")
    private String level2Code;

    /**
     * 三级行政区编码
     */
    @Column(name = "level_3_code")
    private String level3Code;

    /**
     * 详细地址
     */
    @Column(name = "t_detail")
    private String detail;

    /**
     * 邮政编码
     */
    @Column(name = "postal_code")
    private String postalCode;

    /**
     * 手机区号
     */
    @Column(name = "phone_area_code")
    private String phoneAreaCode;

    /**
     * 手机号
     */
    @Column(name = "phone")
    private String phone;


    /**
     * 是否默认
     */
    @Column(name = "is_default")
    private Boolean isDefault;

    /**
     * 用户账号ID
     */
    @Column(name = "user_account_id")
    private Long userAccountId;


    /**
     * 收货人称呼
     */
    @Column(name = "receiver_name")
    private String receiverName;




}
